<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>OrbbecSDK: header_cn/libobsensor/h/Context.h 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="orbbec_icon.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">OrbbecSDK
   &#160;<span id="projectnumber">1.8.3</span>
   </div>
   <div id="projectbrief">OrbbecSDK: 奥比中光 3D 相机开发套件</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="pages.html"><span>相关页面</span></a></li>
      <li><a href="namespaces.html"><span>命名空间</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>文件成员</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_9a5345e98321307492e41331ab8e5636.html">header_cn</a></li><li class="navelem"><a class="el" href="dir_a57403e30bad3723557b0550251f8216.html">libobsensor</a></li><li class="navelem"><a class="el" href="dir_afa7ddcbc480a7aa37c5239e71e2d522.html">h</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">宏定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">Context.h 文件参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>context 是描述 SDK 的 runtime 一个管理类，负责 SDK 的资源申请与释放。 context 具备多设备的管理能力，负责枚举设备，监听设备回调，启用多设备同步等功能。  
<a href="#details">更多...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="ObTypes_8h_source.html">ObTypes.h</a>&quot;</code><br />
</div>
<p><a href="Context_8h_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
宏定义</h2></td></tr>
<tr class="memitem:a10d632e4c78c959a38ab9d924340bb7c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#a10d632e4c78c959a38ab9d924340bb7c">ob_enable_multi_device_sync</a>&#160;&#160;&#160;<a class="el" href="Context_8h.html#ae014e8e9574ae539e59e1318e656020a">ob_enable_device_clock_sync</a></td></tr>
<tr class="separator:a10d632e4c78c959a38ab9d924340bb7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:ab5067edf650d0e615547716924c6096a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#ab5067edf650d0e615547716924c6096a">ob_create_context</a> (<a class="el" href="structob__error.html">ob_error</a> **error)</td></tr>
<tr class="memdesc:ab5067edf650d0e615547716924c6096a"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建上下文对象  <a href="#ab5067edf650d0e615547716924c6096a">更多...</a><br /></td></tr>
<tr class="separator:ab5067edf650d0e615547716924c6096a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a159547490a29f486282e8986c713465f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#a159547490a29f486282e8986c713465f">ob_create_context_with_config</a> (const char *config_path, <a class="el" href="structob__error.html">ob_error</a> **error)</td></tr>
<tr class="memdesc:a159547490a29f486282e8986c713465f"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建具有指定配置文件的上下文对象  <a href="#a159547490a29f486282e8986c713465f">更多...</a><br /></td></tr>
<tr class="separator:a159547490a29f486282e8986c713465f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad87bc8cd42069673a471392ec140a95d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#ad87bc8cd42069673a471392ec140a95d">ob_delete_context</a> (<a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *context, <a class="el" href="structob__error.html">ob_error</a> **error)</td></tr>
<tr class="memdesc:ad87bc8cd42069673a471392ec140a95d"><td class="mdescLeft">&#160;</td><td class="mdescRight">删除上下文对象  <a href="#ad87bc8cd42069673a471392ec140a95d">更多...</a><br /></td></tr>
<tr class="separator:ad87bc8cd42069673a471392ec140a95d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98e0e65f5dd28c7a0f269feaad5a3acd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ObTypes_8h.html#a808e5e274a0a28eef27f22e0e91508e0">ob_device_list</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#a98e0e65f5dd28c7a0f269feaad5a3acd">ob_query_device_list</a> (<a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *context, <a class="el" href="structob__error.html">ob_error</a> **error)</td></tr>
<tr class="memdesc:a98e0e65f5dd28c7a0f269feaad5a3acd"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取枚举设备列表  <a href="#a98e0e65f5dd28c7a0f269feaad5a3acd">更多...</a><br /></td></tr>
<tr class="separator:a98e0e65f5dd28c7a0f269feaad5a3acd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae762ccb84e9cd16617cb97e335f33972"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#ae762ccb84e9cd16617cb97e335f33972">ob_enable_net_device_enumeration</a> (<a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *context, bool enable, <a class="el" href="structob__error.html">ob_error</a> **error)</td></tr>
<tr class="memdesc:ae762ccb84e9cd16617cb97e335f33972"><td class="mdescLeft">&#160;</td><td class="mdescRight">启用或禁用网络设备枚举  <a href="#ae762ccb84e9cd16617cb97e335f33972">更多...</a><br /></td></tr>
<tr class="separator:ae762ccb84e9cd16617cb97e335f33972"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12b188700324e3e1f0b144e3fa57a451"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ObTypes_8h.html#a3c87c98acfd9b143bb58c731d95fa437">ob_device</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#a12b188700324e3e1f0b144e3fa57a451">ob_create_net_device</a> (<a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *context, const char *address, uint16_t port, <a class="el" href="structob__error.html">ob_error</a> **error)</td></tr>
<tr class="memdesc:a12b188700324e3e1f0b144e3fa57a451"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建网络设备对象  <a href="#a12b188700324e3e1f0b144e3fa57a451">更多...</a><br /></td></tr>
<tr class="separator:a12b188700324e3e1f0b144e3fa57a451"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acebdeed40dc2dc6abd78ec007fde9d4d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#acebdeed40dc2dc6abd78ec007fde9d4d">ob_set_device_changed_callback</a> (<a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *context, <a class="el" href="ObTypes_8h.html#a0e6f8b80b87aec989df49ff0e5465e86">ob_device_changed_callback</a> callback, void *user_data, <a class="el" href="structob__error.html">ob_error</a> **error)</td></tr>
<tr class="memdesc:acebdeed40dc2dc6abd78ec007fde9d4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置设备插拔回调函数  <a href="#acebdeed40dc2dc6abd78ec007fde9d4d">更多...</a><br /></td></tr>
<tr class="separator:acebdeed40dc2dc6abd78ec007fde9d4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae014e8e9574ae539e59e1318e656020a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#ae014e8e9574ae539e59e1318e656020a">ob_enable_device_clock_sync</a> (<a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *context, uint64_t repeatInterval, <a class="el" href="structob__error.html">ob_error</a> **error)</td></tr>
<tr class="memdesc:ae014e8e9574ae539e59e1318e656020a"><td class="mdescLeft">&#160;</td><td class="mdescRight">使能设备时钟同步以同步主机和所有已创建设备的时钟（如果支持）。  <a href="#ae014e8e9574ae539e59e1318e656020a">更多...</a><br /></td></tr>
<tr class="separator:ae014e8e9574ae539e59e1318e656020a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fe4e159dfb8afaab3eabccd82e1bb9c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#a2fe4e159dfb8afaab3eabccd82e1bb9c">ob_free_idle_memory</a> (<a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *context, <a class="el" href="structob__error.html">ob_error</a> **error)</td></tr>
<tr class="memdesc:a2fe4e159dfb8afaab3eabccd82e1bb9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">从内部帧内存池中释放空闲内存  <a href="#a2fe4e159dfb8afaab3eabccd82e1bb9c">更多...</a><br /></td></tr>
<tr class="separator:a2fe4e159dfb8afaab3eabccd82e1bb9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79a802866392f4bdfe720f96d207467a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#a79a802866392f4bdfe720f96d207467a">ob_set_logger_severity</a> (<a class="el" href="ObTypes_8h.html#ae785de40f46cc46ee1b8622725f912bc">ob_log_severity</a> severity, <a class="el" href="structob__error.html">ob_error</a> **error)</td></tr>
<tr class="memdesc:a79a802866392f4bdfe720f96d207467a"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置全局日志等级  <a href="#a79a802866392f4bdfe720f96d207467a">更多...</a><br /></td></tr>
<tr class="separator:a79a802866392f4bdfe720f96d207467a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab79a13113a7e2bf0d793ffba5b93be03"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#ab79a13113a7e2bf0d793ffba5b93be03">ob_set_logger_to_file</a> (<a class="el" href="ObTypes_8h.html#ae785de40f46cc46ee1b8622725f912bc">ob_log_severity</a> severity, const char *directory, <a class="el" href="structob__error.html">ob_error</a> **error)</td></tr>
<tr class="memdesc:ab79a13113a7e2bf0d793ffba5b93be03"><td class="mdescLeft">&#160;</td><td class="mdescRight">将日志输出设置为文件  <a href="#ab79a13113a7e2bf0d793ffba5b93be03">更多...</a><br /></td></tr>
<tr class="separator:ab79a13113a7e2bf0d793ffba5b93be03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a350986fb46826aa5a45e0042b21b6a1f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#a350986fb46826aa5a45e0042b21b6a1f">ob_set_logger_callback</a> (<a class="el" href="ObTypes_8h.html#ae785de40f46cc46ee1b8622725f912bc">ob_log_severity</a> severity, <a class="el" href="ObTypes_8h.html#a572a2b25bc592cba31f4c2e621fa3b8d">ob_log_callback</a> callback, void *user_data, <a class="el" href="structob__error.html">ob_error</a> **error)</td></tr>
<tr class="memdesc:a350986fb46826aa5a45e0042b21b6a1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置日志的回调函数  <a href="#a350986fb46826aa5a45e0042b21b6a1f">更多...</a><br /></td></tr>
<tr class="separator:a350986fb46826aa5a45e0042b21b6a1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fa8b36789dc4795a62e12921d43465d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#a3fa8b36789dc4795a62e12921d43465d">ob_set_logger_to_console</a> (<a class="el" href="ObTypes_8h.html#ae785de40f46cc46ee1b8622725f912bc">ob_log_severity</a> severity, <a class="el" href="structob__error.html">ob_error</a> **error)</td></tr>
<tr class="memdesc:a3fa8b36789dc4795a62e12921d43465d"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置日志输出到控制台  <a href="#a3fa8b36789dc4795a62e12921d43465d">更多...</a><br /></td></tr>
<tr class="separator:a3fa8b36789dc4795a62e12921d43465d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75ca999bcd3dea0808ed9ccff28bf00b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#a75ca999bcd3dea0808ed9ccff28bf00b">ob_load_license</a> (const char *filePath, const char *key, <a class="el" href="structob__error.html">ob_error</a> **error)</td></tr>
<tr class="memdesc:a75ca999bcd3dea0808ed9ccff28bf00b"><td class="mdescLeft">&#160;</td><td class="mdescRight">加载 license  <a href="#a75ca999bcd3dea0808ed9ccff28bf00b">更多...</a><br /></td></tr>
<tr class="separator:a75ca999bcd3dea0808ed9ccff28bf00b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf0f9777acf870a662b04ec73f57bab5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Context_8h.html#abf0f9777acf870a662b04ec73f57bab5">ob_load_license_from_data</a> (const char *data, uint32_t dataLen, const char *key, <a class="el" href="structob__error.html">ob_error</a> **error)</td></tr>
<tr class="memdesc:abf0f9777acf870a662b04ec73f57bab5"><td class="mdescLeft">&#160;</td><td class="mdescRight">从数据加载 license  <a href="#abf0f9777acf870a662b04ec73f57bab5">更多...</a><br /></td></tr>
<tr class="separator:abf0f9777acf870a662b04ec73f57bab5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>context 是描述 SDK 的 runtime 一个管理类，负责 SDK 的资源申请与释放。 context 具备多设备的管理能力，负责枚举设备，监听设备回调，启用多设备同步等功能。 </p>

<p>在文件 <a class="el" href="Context_8h_source.html">Context.h</a> 中定义.</p>
</div><h2 class="groupheader">宏定义说明</h2>
<a class="anchor" id="a10d632e4c78c959a38ab9d924340bb7c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ob_enable_multi_device_sync&#160;&#160;&#160;<a class="el" href="Context_8h.html#ae014e8e9574ae539e59e1318e656020a">ob_enable_device_clock_sync</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>在文件 <a class="el" href="Context_8h_source.html">Context.h</a> 第 <a class="el" href="Context_8h_source.html#l00090">90</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">函数说明</h2>
<a class="anchor" id="ab5067edf650d0e615547716924c6096a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a>* ob_create_context </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structob__error.html">ob_error</a> **&#160;</td>
          <td class="paramname"><em>error</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>创建上下文对象 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">error</td><td>指向在上下文创建期间发生错误时将填充的错误对象的指针 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>指向创建的上下文对象的指针 </dd></dl>

</div>
</div>
<a class="anchor" id="a159547490a29f486282e8986c713465f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a>* ob_create_context_with_config </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>config_path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structob__error.html">ob_error</a> **&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>创建具有指定配置文件的上下文对象 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">config_path</td><td>配置文件的路径。如果为 NULL，则将使用默认配置文件。 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">error</td><td>指向错误对象的指针，如果在上下文创建期间发生错误，则将填充该错误对象 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>指向创建的上下文对象的指针 </dd></dl>

</div>
</div>
<a class="anchor" id="ad87bc8cd42069673a471392ec140a95d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob_delete_context </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structob__error.html">ob_error</a> **&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>删除上下文对象 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">context</td><td>指向要删除的上下文对象的指针 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">error</td><td>指向错误对象的指针，如果在上下文删除期间发生错误，将填充该对象 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a98e0e65f5dd28c7a0f269feaad5a3acd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ObTypes_8h.html#a808e5e274a0a28eef27f22e0e91508e0">ob_device_list</a>* ob_query_device_list </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structob__error.html">ob_error</a> **&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取枚举设备列表 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">context</td><td>指向上下文对象的指针 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">error</td><td>指向错误对象的指针，如果在设备枚举期间发生错误，将填充该对象 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>指向设备列表对象的指针 </dd></dl>

</div>
</div>
<a class="anchor" id="ae762ccb84e9cd16617cb97e335f33972"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob_enable_net_device_enumeration </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structob__error.html">ob_error</a> **&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>启用或禁用网络设备枚举 </p>
<p>启用后，网络设备将自动被发现，并且可以通过 <a class="el" href="Context_8h.html#a98e0e65f5dd28c7a0f269feaad5a3acd">ob_query_device_list</a> 获取。默认状态可以在配置文件中设置。</p>
<dl class="section attention"><dt>注意</dt><dd>网络设备枚举通过 gvcp 协议，如果设备和主机不在同一子网，将被发现但无法连接。</dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">context</td><td>指向上下文对象的指针 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">enable</td><td>true 启用，false 禁用 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">error</td><td>指向错误对象的指针，如果发生错误，将填充该对象 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a12b188700324e3e1f0b144e3fa57a451"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ObTypes_8h.html#a3c87c98acfd9b143bb58c731d95fa437">ob_device</a>* ob_create_net_device </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structob__error.html">ob_error</a> **&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>创建网络设备对象 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">context</td><td>指向上下文对象的指针 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>IP 地址 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">port</td><td>端口号 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">error</td><td>指向错误对象的指针，如果在设备创建过程中发生错误，将填充该对象 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>指向已创建设备对象的指针 </dd></dl>

</div>
</div>
<a class="anchor" id="acebdeed40dc2dc6abd78ec007fde9d4d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob_set_device_changed_callback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#a0e6f8b80b87aec989df49ff0e5465e86">ob_device_changed_callback</a>&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>user_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structob__error.html">ob_error</a> **&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置设备插拔回调函数 </p>
<dl class="section attention"><dt>注意</dt><dd>通过回调接口返回的 added 和 removed 设备列表, 需要手动释放设备列表</dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">context</td><td>指向上下文对象的指针 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>指向插拔设备时触发的回调函数的指针 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">user_data</td><td>指向可传递到回调函数和从回调函数获取的用户数据的指针 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">error</td><td>指向错误对象的指针，如果在回调函数设置期间发生错误，将填充该对象 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae014e8e9574ae539e59e1318e656020a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob_enable_device_clock_sync </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>repeatInterval</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structob__error.html">ob_error</a> **&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>使能设备时钟同步以同步主机和所有已创建设备的时钟（如果支持）。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">context</td><td>指向上下文对象的指针 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">repeatInterval</td><td>自动重复同步的时间间隔，以毫秒为单位。如果值为 0，则仅执行一次同步。 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">error</td><td>指向错误对象的指针，如果执行期间发生错误，则将填充该对象 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a2fe4e159dfb8afaab3eabccd82e1bb9c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob_free_idle_memory </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#ab96d384dfaeb83b9086aa8c9caf58d05">ob_context</a> *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structob__error.html">ob_error</a> **&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>从内部帧内存池中释放空闲内存 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">context</td><td>指向上下文对象的指针 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">error</td><td>指向错误对象的指针，在释放内存期间出现错误时，将填充该对象 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a79a802866392f4bdfe720f96d207467a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob_set_logger_severity </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#ae785de40f46cc46ee1b8622725f912bc">ob_log_severity</a>&#160;</td>
          <td class="paramname"><em>severity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structob__error.html">ob_error</a> **&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置全局日志等级 </p>
<dl class="section attention"><dt>注意</dt><dd>此接口设置会影响所有日志（终端、文件、回调）的输出日志等级</dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">severity</td><td>日志等级 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">error</td><td>指向错误对象的指针，在日志等级设置期间出现错误时，将填充该对象 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab79a13113a7e2bf0d793ffba5b93be03"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob_set_logger_to_file </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#ae785de40f46cc46ee1b8622725f912bc">ob_log_severity</a>&#160;</td>
          <td class="paramname"><em>severity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>directory</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structob__error.html">ob_error</a> **&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>将日志输出设置为文件 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">severity</td><td>要输出到文件的日志等级 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">directory</td><td>日志文件输出目录的路径。如果路径为空，则将继续使用现有设置（如果现有的 配置也是空的，日志不会输出到文件） </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">error</td><td>指向错误对象的指针，如果在日志输出设置期间发生错误，将填充该对象 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a350986fb46826aa5a45e0042b21b6a1f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob_set_logger_callback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#ae785de40f46cc46ee1b8622725f912bc">ob_log_severity</a>&#160;</td>
          <td class="paramname"><em>severity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#a572a2b25bc592cba31f4c2e621fa3b8d">ob_log_callback</a>&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>user_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structob__error.html">ob_error</a> **&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置日志的回调函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">severity</td><td>日志等级 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>指向回调函数的指针 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">user_data</td><td>指向可传递到回调函数的用户数据的指针 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">error</td><td>指向错误对象的指针，如果在日志回调函数设置期间发生错误，将填充该对象 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3fa8b36789dc4795a62e12921d43465d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob_set_logger_to_console </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#ae785de40f46cc46ee1b8622725f912bc">ob_log_severity</a>&#160;</td>
          <td class="paramname"><em>severity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structob__error.html">ob_error</a> **&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置日志输出到控制台 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">severity</td><td>要输出到控制台的日志等级 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">error</td><td>指向错误对象的指针，如果在日志输出设置期间发生错误，将填充该对象 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a75ca999bcd3dea0808ed9ccff28bf00b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob_load_license </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filePath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structob__error.html">ob_error</a> **&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>加载 license </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">filePath</td><td>license 文件的路径 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>“OB_DEFAULT_DECRYPT_KEY” 可用于表示默认密钥。 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">error</td><td>指向错误对象的指针，如果在 license 加载期间发生错误，将填充该对象 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="abf0f9777acf870a662b04ec73f57bab5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob_load_license_from_data </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>dataLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structob__error.html">ob_error</a> **&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>从数据加载 license </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>指向 license 数据的指针 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dataLen</td><td>license 数据的长度 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>“OB_DEFAULT_DECRYPT_KEY” 可用于表示默认密钥。 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">error</td><td>指向错误对象的指针，如果在 license 加载期间发生错误，将填充该对象 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2023年 十一月 24日 星期五 10:56:17 , 为 OrbbecSDK使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
